package com.atguigu.springcloud.Factory.test;

import com.atguigu.springcloud.Factory.CheckersFactory;
import com.atguigu.springcloud.Factory.ChessFactory;
import com.atguigu.springcloud.Factory.GameFactory;
import com.atguigu.springcloud.Factory.service.Game;

/**
 * @Author: Fanw
 * @Date: 2021/5/16 22:08
 * @Description:
 */
public class Games {

    public static void playGame(GameFactory factory) {
        Game game = factory.getGame();
        while (game.move()) {
            ;
        }
    }

    public static void main(String[] args) {
        playGame(new CheckersFactory());
        playGame(new ChessFactory());
    }
}
